﻿@model Aga.GestionDeArchivos.Web.Models.Guarda.VerRemitoModel
@{
    ViewBag.Title = "Ver Remito";
    Layout = "~/Views/Shared/_InternalLayout.cshtml";
}

<div id="content">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box-style1">
        <tr>
            <td id="box2">
                <h2>
                    Salida en Consulta de Contenedor Cerrado</h2>
                @using (Html.BeginForm())
                {
                    <p>
                        <b>@Html.LabelFor(model => model.Remito.Cliente.Nombre):</b>
                        @Html.DisplayFor(model => model.Remito.Cliente.Nombre, new { @class = "extralargetext" })
                        <br />
                        <b>@Html.LabelFor(model => model.Remito.DomicilioEntrega):</b>
                        @Html.DisplayFor(model => model.Remito.DomicilioEntrega, new { style = "width:600px", @class = "extralargetext" })
                        <br />
                        <b>@Html.LabelFor(model => model.Remito.Responsable):</b>
                        @Html.DisplayFor(model => model.Remito.Responsable, new { style = "width:600px", @class = "extralargetext" })
                    </p>
                    <table class="abm">
                        <tr>
                            <th>Cantidad</th>
                            @if (Model.Remito.TipoRemito != (int)Aga.GestionDeArchivos.Services.TipoRemito.RemitoVarios)
                            {
                                <th>Caja</th>
                                <th>Detalle</th>
                            }
                            else
                            {
                               <th>Item</th>
                               <th>Descripción</th>
                            }
                        </tr>
                        @foreach (var item in Model.Remito.Items)
                        {
                        <tr>
                            <td>@item.Cantidad</td>
                            @if (Model.Remito.TipoRemito != (int)Aga.GestionDeArchivos.Services.TipoRemito.RemitoVarios)
                            {
                                <td>@item.CajaCliente.Numero</td>
                                <td>@item.Detalle</td>
                            }
                            else
                            {
                                <td>@item.Detalle</td>
                                <td>@item.Descripcion</td>
                            }
                        </tr>
                        }
                    </table>
                    <p>
                        <b>@Html.LabelFor(model => model.Remito.Observaciones):</b>
                        <br />
                        @Html.DisplayFor(model => model.Remito.Observaciones, new { width = "690px" })
                    </p>
                    <p class="buttons alignleft">
                        @*@Html.ActionLink("Volver", "Remitos", "Guarda")*@
                        <a href="javascript:history.back(1);">Volver</a>
                        @Html.ActionLink("Imprimir", "ImprimirRemito", "Guarda", new { id = Model.Remito.Id }, new { target = "_new" })
                    </p>
                }
            </td>
        </tr>
    </table>
</div>
